package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.dao.impl.player.UserBanquetSettingDaoImpl;
import com.yanqu.road.entity.banquet.*;
import com.yanqu.road.entity.banquet.cross.CrossBanquetMember;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Map;

public class UserBanquetBussiness {

    public static int getUserBanquetNormalCount(long userId) {
        return DaoHelper.getUserBanquetDaoImpl().getUserBanquetNormalCount(userId);
    }

    public static Map<String,UserBanquetData> getAllUserBanquetMap() {
        return DaoHelper.getUserBanquetDaoImpl().getAllUserBanquetMap();
    }

    public static Map<String,UserBanquetData> getRunningUserBanquetMap() {
        return DaoHelper.getUserBanquetDaoImpl().getRunningUserBanquetMap();
    }

    public static boolean addUserBanquet(UserBanquetData data) {
        return DaoHelper.getUserBanquetDaoImpl().add(data);
    }

    public static boolean updateUserBanquet(UserBanquetData data) {
        return DaoHelper.getUserBanquetDaoImpl().update(data);
    }

    public static Map<Long, UserBanquetMember> getUserBanquetMemberMap(String banquetId){
        return DaoHelper.getUserBanquetMemberDaoImpl().getUserBanquetMemberMap(banquetId);
    }

    public static boolean addUserBanquetMember(UserBanquetMember data) {
        return DaoHelper.getUserBanquetMemberDaoImpl().add(data);
    }

    public static boolean updateUserBanquetMember(UserBanquetMember data) {
        return DaoHelper.getUserBanquetMemberDaoImpl().update(data);
    }

    public static Map<String, UserBanquetRecord> getUserBanquetRecordMap(long userId, String typeIn, long beginTime, int rowMax){
        return DaoHelper.getUserBanquetRecordDaoImpl().getUserBanquetRecordMap(userId,typeIn, beginTime, rowMax);
    }

    public static boolean addUserBanquetRecord(UserBanquetRecord data) {
        return DaoHelper.getUserBanquetRecordDaoImpl().add(data);
    }

    public static Map<String, UserBanquetRecord> getFeastBanquetRecord(String typeIn) {
        return DaoHelper.getUserBanquetRecordDaoImpl().getFeastBanquetRecordMap(typeIn);
    }

    public static Map<Integer, UserBanquetFeastReward> getFeastBanquetReward(String banquetId, long userId) {
        return DaoHelper.getUserBanquetFeastRewardDaoImpl().getUserBanquetFeastRewardMap(banquetId, userId);
    }

    public static boolean addFeastBanquetReward(UserBanquetFeastReward info) {
        return DaoHelper.getUserBanquetFeastRewardDaoImpl().add(info);
    }

    public static boolean updateFeastBanquetReward(UserBanquetFeastReward info) {
        return DaoHelper.getUserBanquetFeastRewardDaoImpl().update(info);
    }

    public static Map<String,UserCrossBanquetData> getRunningUserCrossBanquetMap() {
        return DaoHelper.getUserCrossBanquetDaoImpl().getRunningUserCrossBanquetMap();
    }

    public static Map<Long, CrossBanquetMember> getCrossBanquetMemberMap(String banquetId) {
        return DaoHelper.getUserCrossBanquetDaoImpl().getCrossBanquetMemberMap(banquetId);
    }

    public static boolean addUserCrossBanquet(UserCrossBanquetData data) {
        return DaoHelper.getUserCrossBanquetDaoImpl().add(data);
    }

    public static boolean updateUserCrossBanquet(UserCrossBanquetData data) {
        return DaoHelper.getUserCrossBanquetDaoImpl().update(data);
    }

    public static Map<Integer, UserBanquetSetting> getUserBanquetSetting(long userId) {
        return DaoHelper.getUserBanquetSettingDaoImpl().getUserBanquetSettingMap(userId);
    }

    public static boolean addUserBanquetSetting(UserBanquetSetting data) {
        return DaoHelper.getUserBanquetSettingDaoImpl().add(data);
    }

    public static boolean updateUserBanquetSetting(UserBanquetSetting data) {
        return DaoHelper.getUserBanquetSettingDaoImpl().update(data);
    }

}
